/**
 * Created by webhugo on 16-10-23.
 */
var sequelizex = require('sequelize-short');
var shortDataTypes = sequelizex.DataTypes;

module.exports = (sequelize, DataTypes) =>{

    return sequelize.define('Field', {
        title: shortDataTypes.String(),
        count: shortDataTypes.Int(),
    }, {
        associate: function (models) {
            models.Field.hasMany(models.FieldsOfCourse);
            models.FieldsOfCourse.belongsTo(models.Field);
        },
        instanceMethods: {}
    });
};